<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <meta charset="utf-8" />
    <link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}"/>
    <title>Alex SpringBoot learning!</title>
</head>
<body>
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <a class="navbar-brand" href="#">springboot 演示</a>
            </div>
            <div id="navbar" class="collapse navbar-collapse">
                <ul class="nav navbar-nav">
                    <li><a th:href="@{/hello}">hello示例</a></li>
                </ul>
                <ul class="nav navbar-nav">
                    <li><a th:href="@{/demoView/thymeleaf}">thymeleaf示例</a></li>
                </ul>
                <ul class="nav navbar-nav">
                    <li><a href="#">导航菜单</a></li>
                </ul>
            </div>
        </div>
    </nav>
    <div style="margin: 60px 10px 10px;">
        <h1>名单列表</h1>
        <table class="table table-bordered">
            <thead>
                <tr>
                    <th>#</th>
                    <th>id</th>
                    <th>name</th>
                    <th>age</th>
                    <th>sex</th>
                    <th>createtime</th>
                    <th>unix-createtime</th>
                    <th>update time</th>
                </tr>
            </thead>
            <tbody>
                <tr th:each="person,stat : ${list}">
                    <td th:text="${stat.index+1}">index</td>
                    <td th:text="${person.id}">id</td>
                    <td th:text="${person.name}">name</td>
                    <td th:text="${person.age}">age</td>
                    <td th:text="${person.sex==1?'男':'女'}">sex</td>
                    <!--<td th:text="${#dates.format(person.dateCreateTime, 'yyyy-MM-dd')}">createtime</td>-->
                    <td th:text="${person.dateCreateTime}">dateCreateTime</td>
                    <td th:text="${person.createtime}">createtime</td>
                    <td th:text="${person.updatetime}">updatetime</td>
                </tr>
            </tbody>
        </table>
    </div>
</body>
</html>